<template>
	<view class="gjl-components">
		<view class="h120"></view>
		<view class="footer-content">
			<view class="btn" v-if="!status" @click="btnClick(1)">
				<view class="text">
					{{status?'完成':'管理'}}
				</view>
			</view>
			<view class="btn active" :class="{flex1: status}" @click="btnClick(1)" v-if="status">
				<view class="text u-margin-left-10">完成</view>
			</view>
			<view class="btn active" :class="{flex1: status}" @click="btnClick(2)" v-else>
				<u-icon name="plus" color="#FFFFFF" size="28"></u-icon>
				<view class="text u-margin-left-10">添加收货地址</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			status: {
				type: [Boolean],
				default: false
			}
		},
		data(){
			return {
				
			}
		},
		methods: {
			btnClick(index){
				this.$emit('btnClick',index)
			}
		}
	}
</script>

<style scoped lang="scss">
	.gjl-components{
		.h120{
			height: 120rpx;
		}
		.footer-content{
			position: fixed;
			bottom: 0;
			left: 0;
			width: 100%;
			box-sizing: border-box;
			padding: 0 30rpx;
			background-color: #fff;
			height: 120rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			.flex1{
				flex: 1;
			}
			.btn.active{
				background: linear-gradient(90deg, #FF9B4E 0%, #FF7540 100%);
				border-radius: 40px;
				min-width: 515rpx;
				border: none;
				.text{
					color: #FFFFFF;
				}
			}
			.btn{
				display: flex;
				align-items: center;
				justify-content: center;
				border: 1px solid #CEA4A4;
				border-radius: 40px;
				width: 139rpx;
				line-height: 80rpx;
				.text{
					font-size: 28rpx;
					font-weight: 400;
					color: #000000;
				}
			}
		}
	}
</style>